<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<title>My JSP 'taskshow.jsp' starting page</title>
		<link rel="stylesheet" type="text/css"
			href="${pageContext.request.contextPath}/easyui/1.3.4/themes/default/easyui.css" />
		<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/wu.css" />
		<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/icon.css" />
		<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery-1.8.0.min.js"></script>
		<script type="text/javascript" src="${pageContext.request.contextPath}/easyui/1.3.4/jquery.easyui.min.js"></script>
		<script type="text/javascript"
			src="${pageContext.request.contextPath}/easyui/1.3.4/locale/easyui-lang-zh_CN.js"></script>
		<script type="text/javascript">
			$(function(){
				$("#btnx").click(function(){
					location.href ='tasktable.jsp';
				});
				
			});
		</script>
	</head>

	<body>
		<div style="margin: auto;width: 800px;height: 40px;">
			<a id="btnx" href="javascript:void(0);" class="easyui-linkbutton">返回</a>
		</div>
		<div style="margin: auto; border-bottom: 1px solid black; border-top: 1px solid black; width: 800px;height: 300px">
			<table style="margin-top: 15px;margin-left: 20px;font-size: 12px">
				<input type="hidden" name="userid" value="${sys_user.id }"/>
			
				<tr>
					<td style="width: 100px;height: 40px">姓名:</td>
					<td style="width: 150px">${shenqing.realname }</td>
					<td style="width: 100px">部门：</td>
					<td style="width: 150px">${shenqing.department.deptname}</td>
				</tr>
				<tr>
					<td style="width: 100px;height: 40px">身份:</td>
					<td style="width: 150px">${shenqing.role.rolename}</td>
				</tr>
				
				<c:if test="${task.tasktype.id==1}">
					<tr>
					<td style="width: 100px;height: 40px">开始时间:</td>
					<td style="width: 150px">${leave.starttime }</td>
					<td style="width: 100px">结束时间：</td>
					<td style="width: 150px">${leave.endtime }</td>
					</tr>
					
					<tr>
						<td style="width: 100px">请假类型：</td>
						<td style="width: 150px">${leave.dictionary.dictname }</td>
					</tr>
					<tr>
						<td style="width: 100px">请假事由:</td>
						<td style="width: 150px" colspan="3">${leave.content }</td>
					</tr>
				</c:if>
				<c:if test="${task.tasktype.id==2}">
					<tr>
					<td style="width: 100px;height: 40px">出差日期:</td>
					<td style="width: 150px">${work.starttime }</td>
					<td style="width: 100px">结束日期：</td>
					<td style="width: 150px">${work.endtime }</td>
					</tr>
					
					<tr>
						<td style="width: 100px">交通工具：</td>
						<td style="width: 150px">${work.dictionary.dictname }</td>
						<td style="width: 100px">借款金额：</td>
						<td style="width: 150px">${work.usemoney }</td>
					</tr>
					<tr>
						<td style="width: 100px">出差事由:</td>
						<td style="width: 150px" colspan="3">${work.content }</td>
					</tr>
					<tr>
						<td style="width: 100px">工作任务:</td>
						<td style="width: 150px" colspan="3">${work.wordconten }</td>
					</tr>
				</c:if>
				<c:if test="${task.tasktype.id==3}">
					<tr>
					<td style="width: 100px;height: 40px">车辆编号:</td>
					<td style="width: 150px">${carorder.carinfo.carno }</td>
					<td style="width: 100px">随行人员：</td>
					<td style="width: 150px">${carorder.otheruser }</td>
					</tr>
					<tr>
					<td style="width: 100px;height: 40px">开始日期:</td>
					<td style="width: 150px">${carorder.starttime }</td>
					<td style="width: 100px">结束日期：</td>
					<td style="width: 150px">${carorder.endtime }</td>
					</tr>
					<tr>
					<td style="width: 100px;height: 40px">目的地:</td>
					<td style="width: 150px">${carorder.destination }</td>
					<td style="width: 100px">司机：</td>
					<td style="width: 150px">${carorder.driver }</td>
					</tr>
					<tr>
					<td style="width: 100px;height: 40px">申请里程:</td>
					<td style="width: 150px">${carorder.length }公里</td>
					</tr>
				</c:if>
				<c:if test="${task.tasktype.id==4}">
					<tr>
					<td style="width: 100px;height: 40px">申请时间:</td>
					<td style="width: 150px">${sealorder.ordertime }</td>
					</tr>
					<tr>
					<td style="width: 100px;height: 40px">用章类型:</td>
					<td style="width: 150px">${sealorder.dictionary.dictname }</td>
					</tr>
					<tr>
						<td style="width: 100px">用章事由:</td>
						<td style="width: 150px" colspan="3">${sealorder.content }</td>
					</tr>
				</c:if>
				<c:if test="${task.tasktype.id==6}">
					<tr>
						<td style="width: 100px;height: 40px">申请时间:</td>
						<td style="width: 150px">${cardorder.ordertime }</td>
						<td style="width: 100px;height: 40px">数量:</td>
						<td style="width: 150px">${cardorder.cardnumber }</td>
					</tr>
					<tr>
						<td style="width: 100px;height: 40px">手机号:</td>
						<td style="width: 150px">${cardorder.phone }</td>
						<td style="width: 100px;height: 40px">座机号:</td>
						<td style="width: 150px">${cardorder.tel }</td>
					</tr>
					<tr>
						<td style="width: 100px">备注:</td>
						<td style="width: 150px" colspan="3">${cardorder.content }</td>
					</tr>
				</c:if>
				<c:if test="${task.tasktype.id==7}">
					<tr>
						<td style="width: 100px">申请事由:</td>
						<td style="width: 150px" colspan="3">${money.content }</td>
					</tr>
				</c:if>
				
				
			</table>
		</div>

		<div style="margin: auto;width: 800px;height: 40px; margin-top:15px;">
			<table style="margin-top: 15px;margin-left: 20px;font-size: 12px">
			
				
				<c:if test="${sys_user.id==task.userBySenduser.id}">
				<form action="task.html?op=taskip" method="post" id="ff">
				<tr>
					<td style="width: 100px;height: 40px">审批意见:</td>
					<td style="width: 150px">
						<textarea rows="8px" cols="80px" name="ideal"></textarea>
					</td>
				</tr>
				<input type="hidden" name="id" value="${task.id}">
				<tr>
					<td style="width: 100px">审批结果：</td>
					<td style="width: 150px">
						<input type="radio" name="result" value="0">同意
						<input type="radio" name="result" value="1">不同意
					</td>
				</tr>
				<tr>
					<td style="width: 100px">
						<input type="submit" value="审核">
					</td>
				</tr>
				</form>
				</c:if>
				
				
				
				
				
				
				
				<c:if test="${sys_user.id!=task.userBySenduser.id}">
					<tr>
					<td style="width: 100px;height: 40px">审批意见:</td>
					<td style="width: 150px">${task.ideal }</td>
					<td style="width: 100px">审批结果：</td>
					<td style="width: 150px">
						<c:if test="${task.result==0}">
						</c:if>
						<c:if test="${task.result==1}">
							同意申请
						</c:if>
						<c:if test="${task.result==-1}">
							申请不通过
						</c:if>
					</td>
				</tr>
				<tr>
					<td style="width: 100px;height: 40px">审批时间:</td>
					<td style="width: 150px">${task.examintime }</td>
					<td style="width: 100px;height: 40px">任务状态:</td>
					<td style="width: 150px">
						<c:if test="${task.state==0}">
							待处理
						</c:if>
						<c:if test="${task.state==1}">
							已处理
						</c:if>
					</td>
				</tr>
				</c:if>
			</table>
		</div>	
	</body>
</html>
